﻿$(function () {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'chart-col'
            },
            title: {
                text: ''
            },
            xAxis: {
                categories: ['N 2005', 'N 2006', 'N 2007', 'N 2008', 'N 2009', '4 tháng 2010']
            },
            tooltip: {
                formatter: function() {
                    var s;
                    if (this.point.name) { // the pie chart
                        s = ''+
                            this.point.name +': '+ this.y ;
                    } else {
                        s = ''+
                            this.x  +': '+ this.y;
                    }
                    return s;
                }
            },
            series: [{
                type: 'column',
                name: 'Jane',
                data: [43, 69, 93, 134, 80,25]
            }, {
                type: 'column',
                name: 'John',
                data: [57, 82, 78, 105, 149,30]
            },{
                type: 'spline',
                name: 'Average',
                data: [14, -13, 14, 29, -70.33,-5],
                marker: {
                	lineWidth: 2,
                	lineColor: Highcharts.getOptions().colors[3],
                	fillColor: 'white'
                }
            }],
			credits: {
				enabled: false
			}
        });
    });
    
});